package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee employee);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee employee);
    int updatePassword(Employee employee);

    List<Employee> query(QueryObject qo);


    void insertEmpANdRole(@Param("empId") Long empId, @Param("roleId") Long roleId);

    void deleteEmpANdRole(@Param("empId") Long empId);

    Employee selectUsername(@Param("username") String username, @Param("password") String password);

    List<String> selectByPermission(Long id);

    Employee checkName(@Param("username") String username);

    void repeatPassword(Long id);

    void alterStatus(Employee employee);
}